public class main {

    public static void main(String[]args){

        String s1 ="starer";
        String s2 ="st";

        System.out.println("判断 s1 字符串是否以 st 开头；" + s1.startsWith(s2));
        System.out.println("判断 s1 字符串是否以 er 结尾；" + s1.endsWith("er"));
        System.out.println("判断 s1 字符串是否包含 ar: " + s1.contains("ar"));
        System.out.println("判断 s1 字符是否为空：" + s1.isEmpty());
        System.out.println("判断 s1 s2 字符串是否相等；" +s1.equals(s2));
        System.out.println(s1.substring(2));
        System.out.println(s1.substring(2, 5));
        String ids="1,2,3,4,5,6,7,8,9,10";
        String[]array=ids.split(  ",");
        System.out.println("分割后的数组长度：“array.lengt");
        for (String s:array) {
            System.out.println( s);
        }
    }
}